package com.risenb.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.risenb.bean.QQContract;
import com.risenb.bean.QQContractExample;
import com.risenb.dao.QQContractMapper;
import com.risenb.view.QQNumberExcelView;

@Controller
@RequestMapping("qqContract")
public class QQContractController extends CustomerBaseControllor {

	@Autowired
	QQContractMapper qqContractMapper;

	@RequestMapping(value = "/exportExcel")
	public ModelAndView findBaseLog(@RequestParam Map<String, Object> params, Integer idkey, Integer pageSize,
			Integer pageCurrent) {
		QQContractExample example = new QQContractExample();
		QQContractExample.Criteria criteria = example.createCriteria();
		//criteria.andHomePhoneLike("187%");
		Map<String, Object> data = new HashMap<String, Object>();
		List<QQContract> list = qqContractMapper.selectByExample(example);
		data.put("data", list);
		return new ModelAndView(new QQNumberExcelView(), data);
	}
}
